# define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

int main() {
    int m = 0;
    scanf("%d", &m);
    if (m % 5)printf("NO");
    else printf("YES");
    return 0;
}
